翻訳と辞書 |
variadic macro : ウィキペディア英語版 | variadic macro A variadic macro is a feature of some computer programming languages, especially the C preprocessor, whereby a macro may be declared to accept a varying number of arguments. Variable-argument macros were introduced in 1999 in the ''ISO/IEC 9899:1999'' (C99) revision of the C language standard, and in 2011 in ''ISO/IEC 14882:2011'' (C++11) revision of the C++ language standard.〔Working draft changes for C99 preprocessor synchronization - http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2004/n1653.htm〕 == Declaration syntax ==
The declaration syntax is similar to that of variadic functions: an ''ellipsis'' "..." is used to indicate that one or more arguments must be passed. Common compilers also permit passing zero arguments to such a macro, however.〔(Variadic Macros - Using the GNU Compiler Collection (GCC) )〕〔(Variadic Macros (C++) )〕 During macro expansion each occurrence of the special identifier __VA_ARGS__ in the macro replacement list is replaced by the passed arguments. No means is provided to access individual arguments in the variable argument list, nor to find out how many were passed. However, macros can be written to count the number of arguments that have been passed.
抄文引用元・出典: フリー百科事典『 ウィキペディア(Wikipedia)』 ■ウィキペディアで「variadic macro」の詳細全文を読む
スポンサード リンク
翻訳と辞書 : 翻訳のためのインターネットリソース |
Copyright(C) kotoba.ne.jp 1997-2016. All Rights Reserved.
|
|